<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    for(var i=0;i<=6;i++){
       for(var j=6;j>i;j--){
           document.write('&nbsp;&nbsp;&nbsp;');
       } 
       for(var k=0;k<=i;k++){
        document.write(k+"&nbsp;");
       }
       for(var m=i-1;m>=0;m--){
           document.write(m+"&nbsp;")
       }
       document.write("<br>")
    }
</script>

</body>
<script>
</html>